package com.ruoyi.service.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.service.mapper.ServiceReasonMapper;
import com.ruoyi.service.domain.ServiceReason;
import com.ruoyi.service.service.IServiceReasonService;

/**
 * 锁定原因Service业务层处理
 * 
 * @author ZDL
 * @date 2024-11-12
 */
@Service
public class ServiceReasonServiceImpl implements IServiceReasonService 
{
    @Autowired
    private ServiceReasonMapper serviceReasonMapper;

    /**
     * 查询锁定原因
     * 
     * @param reasonId 锁定原因主键
     * @return 锁定原因
     */
    @Override
    public ServiceReason selectServiceReasonByReasonId(Long reasonId)
    {
        return serviceReasonMapper.selectServiceReasonByReasonId(reasonId);
    }

    /**
     * 查询锁定原因列表
     * 
     * @param serviceReason 锁定原因
     * @return 锁定原因
     */
    @Override
    public List<ServiceReason> selectServiceReasonList(ServiceReason serviceReason)
    {
        return serviceReasonMapper.selectServiceReasonList(serviceReason);
    }

    /**
     * 新增锁定原因
     * 
     * @param serviceReason 锁定原因
     * @return 结果
     */
    @Override
    public int insertServiceReason(ServiceReason serviceReason)
    {
        return serviceReasonMapper.insertServiceReason(serviceReason);
    }

    /**
     * 修改锁定原因
     * 
     * @param serviceReason 锁定原因
     * @return 结果
     */
    @Override
    public int updateServiceReason(ServiceReason serviceReason)
    {
        return serviceReasonMapper.updateServiceReason(serviceReason);
    }

    /**
     * 批量删除锁定原因
     * 
     * @param reasonIds 需要删除的锁定原因主键
     * @return 结果
     */
    @Override
    public int deleteServiceReasonByReasonIds(Long[] reasonIds)
    {
        return serviceReasonMapper.deleteServiceReasonByReasonIds(reasonIds);
    }

    /**
     * 删除锁定原因信息
     * 
     * @param reasonId 锁定原因主键
     * @return 结果
     */
    @Override
    public int deleteServiceReasonByReasonId(Long reasonId)
    {
        return serviceReasonMapper.deleteServiceReasonByReasonId(reasonId);
    }
}
